package com.foreknow.service.impl;

import com.foreknow.bean.Admin;
import com.foreknow.dao.AdminDao;
import com.foreknow.dao.impl.AdminDaoImpl;
import com.foreknow.service.AdminService;

public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao;

    public void setAdminDao(AdminDao adminDao) {
        this.adminDao = adminDao;
    }

    @Override
    public void add(Admin admin) {
        adminDao.save(admin);
    }

    public static void main(String[] args) {
        AdminServiceImpl service = new AdminServiceImpl();
        service.setAdminDao(new AdminDaoImpl());
        service.add(new Admin());
    }
}
